/*
 * GeoVISTA Center (Penn State, Dept. of Geography)
 * Copyright (c), 2003-2011,  Jin Chen and Alan M. MacEachren, GeoVISTA Center, Penn State University
 * Licensed under Simplified BSD License
 *
 *
 * @author: jin Chen 
 * @date: Nov 18, 2005$
 * @version: 1.0
 */
package edu.psu.geovista.app.gmatrix.toolkit;

import edu.psu.geovista.app.gmatrix.canvas.DfMatrixCanvas;
import edu.psu.geovista.app.gmatrix.component.DfMatrixHeader;
import edu.psu.geovista.app.hce.dendroview.node.HorizontalBNode;

import java.util.logging.Level;
import java.util.logging.Logger;

public class LoggerMgr {
    private static final Logger logger=Logger.getLogger(LoggerMgr.class.getName());
    

    public static void setLevel(Class aclass, Level mylevel){
          Logger logger=Logger.getLogger(aclass.getName());
          //ConsoleHandler handler=new ConsoleHandler();
          //logger.addHandler(handler);  // 

          logger.setLevel(mylevel);
          //handler.setLevel(mylevel );// 
       // logger.get
    }


    public static void setting(){
        //setLevel(DfMouseSelectSupport.class,Level.FINE );
       setLevel(DfMatrixHeader.class,Level.FINE );
         //setLevel(JMatrix.class,Level.FINE );
         //setLevel(DfMatrixUI.class,Level.FINE );
         //setLevel(DfDendrogram2.class,Level.FINE );
         setLevel(HorizontalBNode.class,Level.FINE );   // JRowHeadDfTableModel
         setLevel(DfMatrixCanvas.class,Level.FINE );

        //setLevel(JRowHeadDfTableModel.class,Level.FINE );
    }
     public static void fine(Logger log, String msg){
        if(log.isLoggable(Level.FINE ) ){
            System.out.println(msg);
        }
    }
}
